class UserManager {
    constructor() {
        this.userId = 0;
        this.permissions = '';
        //this.token='';
    }

    setUserId(account) {
        this.userId = account;
    }

    getUserId() {
        return this.userId;
    }
    setToken(token)
    {
        this.token=token;
    }
    getToken()
    {
        return this.token;
    }
    setPermissions(permissions) {
        this.permissions = permissions;
    }

    getPermissions() {
        return this.permissions;
    }

    is(permission) {
        return this.permissions.equals(permission);
    }
}

const userManager = new UserManager();
export default userManager;
